1.       Define a class called UFC fighter. a.       Make instance variable foe Name, Weight, Wins, Losses b.      Create a static variable for...

profilekivjkraranp

1.       Define a class called UFC fighter.

a.       Make instance variable foe Name, Weight, Wins, Losses

b.      Create a static variable for TotalFights

c.       Create a default constructor that defaults name to “NoName yet” and all other variables to 0.

d.      Create a constructor that has parameters that set the value for name and weight, and sets wins and losses to -.

e.      Create accessor methods for all the variables.

f.        Create a method that increments Wins and TotalFights

g.       Create a method that increments losses and TotalFights.

h.      Create a method that compares a fighter’s wins to their losses and tells whether or not they have a winning record.

2.       Create an Array of integers called Numbers. Allow the user to pick the size of the array and enter values for each index. After the array is filled, return the sum of all the values. Then reprint the numbers and state what percentage of the sum the value is.

 

How many numbers will you enter?

2

1

1

Enter the Numbers

2, Which is 50% of the sum

1, Which is 25% of the sum

 

1, Which is 25% of the sum

    • 11 years ago
    • 18
    Answer(2)

    Purchase the answer to view it

    blurred-text
    NOT RATED
    • attachment
      assignment.zip

    Purchase the answer to view it

    blurred-text
    NOT RATED
    • attachment
      ufcfighter.doc
    • attachment
      ufcfighter.png
    • attachment
      ufcfighter.zip
    • attachment
      arrayint.zip
    • attachment
      arrayint.doc
    • attachment
      arrayint.png
    Bids(0)